package com.tianmenguide.wxapi;

import com.tianmenguide.common.core.domain.AjaxResult;
import com.tianmenguide.guide.domain.Banners;
import com.tianmenguide.guide.service.IBannersService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/wxapi")
@RequiredArgsConstructor
@Api(tags = "轮播图wxapi")
public class WxBannerController {

    private final IBannersService bannersService;

    @GetMapping("/loadBaneer")
    @ApiOperation("查询轮播图列表")
    public AjaxResult loadBaneer(Banners banners){
        List<Banners> bannerslist = bannersService.selectBannersList(banners);
        return AjaxResult.success(bannerslist);
    }
}
